interface Person {
  name: string;

  gender: 0 | 1;

  age?: number;
}

let a: Record<number, Person>;

a = {
  0: {
    name: 'fenglinz',
    gender: 0,
    age: 10
  }
}

type otherPerson = Pick<Person, 'name' | 'age'>;

let o: otherPerson = {name: '111', age: 10}

console.log(o);